import request from '@/utils/system/request'

// 获取全部
export function getAll() {
  return request({
    url: '/work/all-work',
    method: 'get'
  })
}

// 获取
export function getWorkByStatus() {
  return request({
    url: '/work/work-by-status',
    method: 'get'
  })
}

// 获取数据api
export function getData(data: object) {
  return request({
    url: `/work/work-list`,
    method: 'post',
    data
  })
}

// 新增
export function add(data: object) {
  return request({
    url: '/work/work',
    method: 'post',
    data
  })
}

// 编辑
export function update(data: object) {
  return request({
    url: '/work/work',
    method: 'put',
    data
  })
}

// 删除
export function del(data: string[]) {
  return request({
    url: '/work/work',
    method: 'delete',
    data
  })
}